<!-- By QQ:834633039 -->
{template 'common/header'}

{template 'nav'}

<style>

.editable-click, a.editable-click {

    color: #000 !important;

    border-bottom:none !important;

    text-decoration: none;

}

.editable-input.editable-has-buttons {

    width: auto;

    max-width: 100px;

}

.st-sort-ascent:before {

    content: '\25B2';

}

</style>

<!-- 项目管理 -->

{if $op=='list'}

<div class="panel panel-default">

	<div class="panel-heading"><font color="red">【{$list['title']}】</font> - 幻灯片管理</div>

	<div class="panel-body">

		<table  class="table table-striped">

			<thead>

				<tr>

					<th style="width:10%;">幻灯片编号</th>

					<th style="width:10%;">排序序号</th>

					<th style="width:20%;">幻灯片标题</th>

					<th style="width:20%;">幻灯片图片</th>

					<th style="width:20%;">幻灯片链接</th>

					<th style="width:20%;">操作</th>

				</tr>

			</thead>

			<tbody>

			{loop $categorys $row}

				<tr>

					<td>

					{$row['id']}

					</td>

					<td>

					{$row['displayorder']}

					</td>

					<td>

						{$row['title']}

					</td>

					<td>

						<img src="{php echo tomedia($row['img'])}" width=80 height=80 />

					</td>

					<td>

						{$row['url']}

					</td>

					

					<td>

						<a class="btn btn-default" title="编辑" href="{php echo $this->createWebUrl('adv_list',array('op'=>'post','id'=>$row['id'], 'listid' => $_GPC['listid']))}">

							<i class="fa fa-gear"></i>

						</a>

						<a class="btn btn-default" title="删除" href="{php echo $this->createWebUrl('adv_list',array('op'=>'del','id'=>$row['id'], 'listid' => $_GPC['listid']))}" onclick="return confirm('删除将无法恢复，确认吗？');return false;">

							<i class="fa fa-times"></i>

						</a>

					</td>

				</tr>

			{/loop}

			</tbody>

		</table>

		{$pager}

	</div>

	<div class="panel-footer">

		<a href="{php echo $this->createWebUrl('adv_list',array('op'=>'post', 'listid' => $_GPC['listid']))}" class="btn btn-sm btn-success">

			<i class="glyphicon glyphicon-plus"></i>新增幻灯片

		</a>

	</div>

</div>

{elseif $op=='post'}

<div class="panel panel-default">

	<div class="panel-heading">

		{if !empty($adv['id'])}编辑{else}新增{/if}直播幻灯片

	</div>

	<div class="panel-body">

		<form action="" method="post" class="form-horizontal" role="form" id="form1" >

			<input type="hidden" name="id" value="{$adv['id']}"> 

			<div class="form-group">

				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">是否显示</label>

				<div class="col-sm-8 col-lg-9 col-xs-12">

					<label class="radio-inline">

						<input type="radio" name="isshow" value="1"  {if $adv['isshow'] == '1'}checked="true"{/if}>是

					</label>

					<label class="radio-inline">

						<input type="radio" name="isshow" value="0"   {if 

						$adv['isshow'] == '0'}checked="true"{/if}>否

					</label>

					<span class="help-block">是否显示</span>

				</div>

			</div>

			<div class="form-group">

				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">排序序号</label>

				<div class="col-sm-8 col-lg-9 col-xs-12">

					<input type="text" value="{$adv['displayorder']}" class="form-control" name="displayorder">

					<span class="help-block">排序序号</span>

				</div>

			</div>

			

			<div class="form-group">

				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">幻灯片标题</label>

				<div class="col-sm-8 col-lg-9 col-xs-12">

					<input type="text" value="{$adv['title']}" class="form-control" name="title">

					<span class="help-block">幻灯片标题</span>

				</div>

			</div>

			<div class="form-group">

				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">幻灯片图片</label>

				<div class="col-sm-8 col-lg-9 col-xs-12">

					{php echo tpl_form_field_image('img', $adv['img']);}

					<span class="help-block">幻灯片图片 规格360 * 160</span>

				</div>

			</div>

			<div class="form-group">

				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label">幻灯片链接</label>

				<div class="col-sm-8 col-lg-9 col-xs-12">

					{php echo tpl_form_field_link('url',$adv['url']);}

					<span class="help-block">幻灯片链接</span>

				</div>

			</div>

			

			<div class="form-group">

				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label"></label>

				<div class="col-sm-8 col-lg-9 col-xs-12">

					<input type="submit" name="submit" class="btn btn-success" value="提交">
					<input type="hidden" name="listid" value="{$_GPC['listid']}">
					<input type="hidden" name="token" value="{$_W['token']}">

				</div>

			</div>

			

		</form>

	</div>

</div>

{/if}

{template 'common/footer'}